// Copyright 2024 The Google Research Authors.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//     http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

syntax = "proto2";

package eeg_modelling;

import "edf/proto/event.proto";

enum AnnotationType {
  // The annotations can take on two different values which either the presence
  // of a seizure or the background signal.
  SEIZURE_BINARY = 1;
  // Age of the patient.
  AGE = 2;
  // Normal vs. Abnormal pH level.
  PH_BINARY = 3;
  // Raw, unstructured text annotations, e.g. from an EDF file.
  // Text could be UTF8. Could also be a relabeled annotation.
  RAW_TEXT = 4;
  // Has Myocardial infarction v.s. healthy. For ECG data.
  MI_BINARY = 5;
  // MI localization annotations. For ECG data.
  MI_LOCATION = 6;
}

enum MILocationType {
  MILOCATION_UNSPECIFIED = 0;
  MILOCATION_NONE = 1;
  MILOCATION_ANTERIOR = 2;
  MILOCATION_INFERIOR = 3;
  MILOCATION_LATERAL = 4;
  MILOCATION_POSTERIOR = 5;
  MILOCATION_SEPTAL = 6;
}

message Annotation {
  oneof value {
    Events events = 1;
    int64 int_value = 2;
    bool bool_value = 3;
  }
  optional AnnotationType type = 4;
  // Which segment this annotation should map to.
  optional string segment_id = 5;
  // PatientID to be able to map to the patient.
  optional string patient_id = 6;
}

message Annotations {
  repeated Annotation annotation = 1;
}
